package javabean;


import lombok.*;

@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class Sanjiaoxing {
    private int bianchang1;
    private int bianchang2;
    private int bianchang3;




    public boolean sanjiaoxing1() {
         return this.bianchang1+bianchang2>this.bianchang3&&
                this.bianchang2+this.bianchang3>this.bianchang1&&
                this.bianchang1+this.bianchang3>this.bianchang2;
    }
    public double  sanjiaoxing2(){
        double banzhouchang=(this.bianchang1+this.bianchang2+this.bianchang3)/2.0;
        double sqrt = Math.sqrt(banzhouchang*(banzhouchang-this.bianchang1
        )*(banzhouchang-this.bianchang2)*(banzhouchang-this.bianchang3
        ));
        return sqrt;
    }

}

